package com.yeeft.ocr.mapper;

import com.yeeft.ocr.domain.entity.OcrConf;
import com.yeeft.ocr.domain.entity.OcrConfUser;
import com.yeeft.ocr.domain.entity.OcrLog;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * 功能简要描述
 *
 * @author 赵仲文
 * @Copyright (c) 2016, frontpay.cn
 * @date 2018/5/7 15:59
 */

@Mapper
public interface OcrConfMapper {
    @Insert("INSERT INTO OcrConfig(confId, appId, supplierId, bizId) " +
            "VALUES(#{e.confId}, #{e.appId}, #{e.supplierId}, #{e.bizId})")
    // @Options(useGeneratedKeys=true, keyProperty="id")  //添加该行，product中的id将被自动添加
    void insert(@Param("e") OcrConf e);

    @Results({@Result(column="username",property="userName")})
    @Select("select c.confId, u.username, u.password from UserTest u inner join OcrConfig c on u.confId = c.confId")
    List<OcrConfUser> select();
}
